package cn.itrip.service;

import cn.itrip.beans.Dto.Dto;
import cn.itrip.beans.Dto.Token;
import cn.itrip.beans.pojo.ItripUser;
import cn.itrip.common.RedisUtil;
import com.alibaba.fastjson.JSON;
import org.springframework.mobile.device.Device;

public class UserServiceImp implements UserService{


    @Override
    public Dto dologin(String userName, String password, Device device) {

        ItripUser user=new ItripUser();
       //new SimpleDateFormat("yyyyMMddHHmmss").format(new Date())+""+ ValiditorCodeUtil.getCode();

       StringBuilder sb=new StringBuilder();

       sb.append(2);
        Token token=new Token();

        token.setToken(sb.toString());

        if (user!=null){

        }
        //token.setExpTime();

       // RedisUtil.setValueExpire("Token:"+token,JSON.toJSONString(user));

        return null;
    }
}
